import Reflux from 'reflux';
import PageConst from './PageConst';
import Actions from './Actions';
import update from 'react-addons-update';
import { Toast } from 'antd-mobile';
import Utils from '../../utils'
import DB from './../../app/db';
import StorageUtils from './../../app/storage'
import { Control } from 'react-keeper'

export default Reflux.createStore({
  listenables: [Actions],
  data: {
    ...PageConst,
    showWarn: false,
    warnTimer: null,
    codeTimer: null,
    warnMessage: '',
    count: 60,
    showCodeTimer: true,
    vcode: '',
    showCertOK:false,
    showPhoneOK:false,
    phone: '',
    userInfo: {
      certNum: '',
      telNum: '',
      vcode: ''
    }
  },

  updateComponent: function () {
    this.trigger(this.data);
  },

  getInitialState: function () {
    return this.data;
  }
});
